A fundamental goal of neuroscience is to understand the cellular and network mechanisms of neural circuit dynamics that give rise to cognition and behavior. Such a mechanistic picture would significantly enhance our ability to understand and potentially address the cellular and circuit dysfunctions that underlie psychiatric and neurologica disorders, including schizophrenia, epilepsy, and autism. To achieve this understanding, new tools are needed that can measure and perturb neural activity, at cellular and subcellular resolution, in a wide range of neural populations during behavior. Work in this renewal proposal addresses this need by enhancing the capabilities of a powerful set of optical and behavioral instrumentation and methods, developed in the PI's laboratory during the past funding period, for head-restrained mice navigating in virtual reality. When implemented, our proposed aims will provide several new capabilities. First, it will be possible to not only measure, but also experimentally manipulate, specific patterns of neural activity during ongoing behavior by using simultaneous imaging and cellular-resolution optogenetic stimulation in mice navigating in virtual reality (VR). The system will be applied to study synaptic inputs and plasticity underlying place-cell firing patterns in the hippocampus. This capability could also form a general-purpose method for mapping functional connectivity between neurons whose firing properties have been characterized during behavior. Second, it will be possible to apply cellular resolution optical methods in a number of widely studied deep brain regions that are optically inaccessible using current techniques, including medial prefrontal cortex. In addition, our methods will make it possible to image multiple hippocampal areas simultaneously, together spanning the entire hippocampal circuit from input to output. Third, it will be possible to optically measure the dynamics of neuromodulatory inputs within functioning microcircuits, as well as to measure the activity of synaptic inputs to functionally identified neurons during behavior. This will enable direct tests of hypotheses about the contributions these inputs make to cellular and circuit computations. As a first application, we will measure dopaminergic inputs to medial prefrontal cortex at fine spatio-temporal resolution during learning. We will also measure the spatial firing properties of synaptic inputs to hippocampal place cells during virtual navigation. In general, the new capabilities will provide an improved means to discover and characterize the cellular and network mechanisms that underlie neural coding and dynamics.